 <!DOCTYPE html>
<html>
<head>
  <title>Creating Composited Images</title>
  <link rel="stylesheet" href="style.css">
</head>

<body>

<div id="content">
<img src="header_text_5.png" >

<script src="tocgen.js"></script>

<div id="toccontent">

<div class="subject-header">Creating Composited Images</div>

<p>
Flowblade Movie Editor uses Compositors to mix images from two different tracks.
</p>

<div id="toc"></div>

<h3>Compositing Modes</h3>
<p>
The way that Compositors work is defined by a Compositing Mode. Users can select Compositing Mode to suit their preference or editing needs of a particular Sequence.
</p>
<p>
<b>To set Compositing Mode</b> for a Sequence select it from <b><i>Sequence -> Compositing Mode</i></b> sub menu.
</p>

<h4>Top Down Free Move</h4>
<p>
This is the most powerful and complex Compositing Mode. Users can set destination tracks and positions of Compositors freely and create node tree compositions if needed.
</p>
<h4>Top Down Auto Follow</h4>
<p>
<b>Mode removed for 2.6.</b>
</p>
<h4>Standard Auto Follow</h4>
<p>
Compositors follow their origin clips automatically and users can only add one compositor per clip. All Compositors have track V1 as their destination track. It is not possible to create node tree compositions.
</p>
<h4>Standard Full Track</h4>
<p>
This is the most simple and easiest to use Compositing Mode. No Compositors are needed. Fade In/Outs, Wipes and transforms are created with Filters. Some compositing functionality is not available. It is not possible to create node tree compositions
</p>

<h2>Standard Full Track Compositing Mode</h2>
<p>
Compositing in Standard Full Track mode is similar to using layers in applications like Gimp and Photoshop. Compositing in Standard Auto Follow mode happens in bottom to top order. No Compositors are used.


<h3>Workflow</h3>
<ol>
<li>Add Clips on Timeline
<ul>
<li>Images with alpha channel are composited in bottom to top order.</li>
</ul>
<li>Controlling image opacity</li>
<ul>
<li> Add <b>Fade In</b> or <b>Fade Out</b> Filters to create opacity transitions in the beginning or end of Clip.</li>
<li> Add <b>Wipe</b> Filters on top clip to create wipe transitions.</li>
</ul>
<li>Transforming image</li>
<ul>
<li>Add <b>Position Scale</b>, <b>Rotation</b> or <b>Shear</b> filter.</li>
</ul>
</ol>

<h2>Standard Auto Follow Compositing Mode</h2>
<p>
Compositing in Standard Auto Follow mode happens in bottom to top order like in Gimp and Photoshop. Compositors are used and they follow their origin clips automatically.
</p>
<p>
On the Timeline a Compositor is displayed as a purple square with rounded corners.
</p>
<p>
Parameters defining the resulting image are edited in the <b>Compositors</b> tab.
</p>
<h3>Workflow</h3>
<ol>
<li>Creating a Compositor
	<ul>
	<li> Click <b>Right Mouse</b> on any clip on tracks from V5 to V2 and select for example <b>Add Compositor -> Dissolve</b> or <b>Add Blender -> Softlight</b> from popupmenu to create a new Compositor.</li>
	</ul>
<li>Editing Compositor Parameters in Compositors Tab
	<ul>
	<li> Click Compositor with <b>Left Mouse</b>.</li>
	<li> Click <b>Right Mouse</b> on any Compositor and select Open In Compositor Editor</li>
	<li> Edit parameters using value editors.</li>
	</ul>
</li>
<li>Deleting Compositor
	<ul>
	<li> Click <b>Left Mouse</b> on any Compositor to select it and press <b>Delete</b> key.</li>
	</ul>
</li>
</ol>

<h3>EXAMPLE: All tracks need Compositors when creating compositions with more the 2 tracks</h3>
<p>
In this mode all Compositors have track V1 as their target target.
</p>
<p>
Because of this adding a Compositor to only the top track can make it dissapper. 
</p>
<p>
When composition has more then 2 tracks, all clips need to have Compositors to get the expected result.
</p>
<p>
<i><b>Only top track has Compositor</b></i>
</p>
<img src="only_one_comp.png">
<p>
Clip on track V3 has Compositor which composites it on track V1. However, the Clip on track V2 is on top of the composited image on track V1 and gets displayed.
</p>
</p>
<i><b>All tracks have Compositors</b></i>
</p>
<img src="all_comp.png">
<p>
Images on all tracks are composited on track V1 to get the expected result.
</p>

<h2>Top Down Free Move Compositing mode</h2>
<p>
In these modes Compositors have a Source track and a Destination track.</p>
</p>
<p>
On the Timeline a Compositor is displayed as a rectangular object on top of two tracks. Source track is always the one above Compositor, but Destination track may be any of the tracks below it.
</p>
<p>
Parameters defining the resulting image are edited in the <b>Compositors</b> tab.
</p>

<h3>Workflow</h3>
<p>
By combining multiple tracks and multiple Compositors complex composite images can be achieved.
</p>
<ol>
<li>Creating a Compositor
<ul>
<li> Click <b>Right Mouse</b> on any clip on tracks from V5 to V2 and select for example <b>Add Compositor -> Dissolve</b> or <b>Add Blender -> Softlight</b> from popupmenu to create a new Compositor.</li>
</ul>
<li>Trimmimg or Moving a Compositor</li>
<ul>
<li> To trim Compositor start and end points: Press and drag <b>Left Mouse</b> near either end of Compositor on Timeline.</li>
<li> To move Compositor: Press and drag <b>Left Mouse</b> in the middle of Compositor on Timeline.</li>
</ul>
<li>Editing Compositor Parameters in Compositors Tab</li>
<ul>
<li> Double click Compositor with <b>Left Mouse</b>.</li>
<li> Click <b>Right Mouse</b> on any Compositor and select Open In Compositor Editor</li>
<li> Edit parameters using value editors.</li>
</ul>
<li>Deleting Compositor</li>
<ul>
<li> Click <b>Left Mouse</b> on any Compositor to select it and press <b>Delete</b> key.</li>
</ul>
</ol>

<h3>Compositor are executed from top to bottom in Top Down Compositing modes</h3>
In Flowblade Movie Editor <b>the order of rendering is top-to-bottom</b>,
instead of bottom-to-top like in Gimp or Photoshop.

When attempting certain type of multilayer composites this yields results that seem unintuitive,
unless the user is aware of rendering order of Compositors.

<h4>Rendering A Composited Frame</h4>
<ol>
<li>For each frame it is checked if there is a Compositor covering this frame on the top most track.</li>
<li>If such Compositor is found, do composite on Destination track.</li>
<li>Frame on Destination track is now altered and if that frame is used as source the altered version is used</li>
<li>Check if frame on next track below has compositor and if Compositor is found render the composite image</li>
<li>This is done for each track.</li>
<li>Output image on is from the topmost track that has media on the frame and does not have a compostor on the frame.</li>
</ol>

<h3>EXAMPLE: Creating a 3-layer composite</h3>
<p style="margin-bottom:45px" >
In this example we demonstrate how top-to-bottom Compositor
order affects compositing. We are trying to make word 'GO' apperar on top of 2-color
background made by combining red and blue Color Clips using 'Free Stripes' wipe.
</p>
<h4>Media Items and desired result</h4>
<p>
To make alpha transparency work the GO.PNG graphic has to composited using 'Dissolve'.
</p>
<p>
<i><b>Clips: RED and BLUE Color Clips and GO.PNG graphic with alpha transparency</b></i>
</p>
<img src="comp_clips.png">

<p>
<i><b>Desired result</b></i>
</p>

<img style="margin-bottom:45px" src="correct_comp.png">

<h4>Gimp/Photoshop style layer order yields wrong result</h4>
<p>
Here we have arranged clips on the tracks as we would arrange layers in Gimp.
</p>
<p>
<i><b>Gimp style layer order</b></i>
</p>
<img src="wrong_timeline.png">

<p>
What happens here is that first 'GO.PNG' is composited on 'RED' Color Clip, and the resulting image is composited using 'Free Stripes' wipe on top of 'BLUE' Color Clip. We get the wrong result.
</p>
<p>
<i><b>Wrong result</b></i>
</p>
<img  style="margin-bottom:45px" src="wrong_comp.png">
<h4>Correct layer order when compositing order is top-to-bottom</h4>
<p>
Here we have arranged clips in correct order for the desired result.
</p>
<p>
<i><b>Correct layer order</b></i>
</p>
<img src="correct_timeline.png">
<p>
Here 'RED' Color Clip  is first composited using 'Free Stripes' wipe on 'BLUE' Color Clip. After that 'GO.PNG' is composited on top of the resulting image (that is already rendered on track V1) using 'Dissolve' to get final output image.
</p>
<p>
<i><b>Destination track in 'Region' Compositor is V1, Source track is V3</b></i>
</p>

<img src="correct_dest.png">


<p>
<i><b>Desired result</b></i>
</p>

<img style="margin-bottom:45px" src="correct_comp.png">

</div>
</body>

</html> 
